import axios from '@/utils/axios'

export function getAdminPage(params) {
  return axios({
    url: '/user/page',
    method: 'get',
    params
  })
}

export function getAdminList() {
  return axios({
    url: '/user/list?roleId=1001',
    method: 'get'
  })
}

export function createAdmin(data) {
  return axios({
    url: '/user/create',
    method: 'post',
    data
  })
}

export function updateAdmin(data) {
  return axios({
    url: '/user/update/admin',
    method: 'post',
    data
  })
}

export function deleteAdminById(id) {
  return axios({
    url: '/user/delete/info/' + id,
    method: 'get'
  })
}
